<?php
	// json_encode主要用来将数组和对象，转换为json格式
	$arr=array('a'=>1,'b'=>2,'c'=>3,'d'=>4,'e'=>5);
	echo json_encode($arr);
	echo "<br>";
	
	
	class Person{
		public $name="tianwater";//属性
		public $age=12;
	}
	$p1=new Person();
	echo json_encode($p1);

?>

<!-- 
	答案：
	{"a":1,"b":2,"c":3,"d":4,"e":5}
	{"name":"tianwater","age":12} 
-->